<%@page contentType="text/html" import="arocms.Constans"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<h1>Add link</h1>
<p>
    In the form below type the address and description of an web location
    you would like to add. The data will be stored in database.
</p>

<html:form action="/Links/CreateOrUpdate" styleId="linkForm">
    <html:hidden property="id" />
    <table class="FormTable">
        <tr>
            <td>Title:</td>
            <td>
                <div class="errorMessage"> <html:errors property="title"/>  </div>
                <html:text property="title" />
            </td>
        </tr>
        <tr>
            <td>Address:</td>
            <td>
                <div class="errorMessage"> <html:errors property="address"/>  </div>
                <html:text property="address" />
            </td>
        </tr>
        <tr>
            <td>Description</td>
            <td>
                <div class="errorMessage"> <html:errors property="description"/> </div>
                <html:textarea property="description" rows="4" cols="30" />  
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <a class="button" href="javascript: document.getElementById('linkForm').reset()">Reset</a>
                <a class="button" href="javascript: document.getElementById('linkForm').submit()">Submit</a>
            </td>
        </tr>
    </table>
</html:form>